"use strict";
import cookie from "../util/cookie";
import store from "@/store/index"

/**
 * @author zhaojiuyi
 * @date 2022/7/5-17:02
 * @version 1.0.0
 */
const mutations = {

  setToken: (state,token) => {
    state.token = token
    sessionStorage.setItem("token",token)
    // state.token = cookie.getCookie("token")
    // console.log(state.token)
  },
  clearToken:(state)=>{
    state.token = null
    sessionStorage.clear()
  },
  setUserIdentity: (state,identity)=> {
    state.identity = identity
    sessionStorage.setItem("identity",identity)
  }
}
export default mutations
